package com.feige.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @author feige
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="AskForLeaveFormDto对象", description="前端传数据")
public class AskForLeaveFormDto {

    @Range(min = 1, max = 2,message = "是否离校只有两个选择！")
    @ApiModelProperty(value = "是否外出")
    private Integer isGoOut;

    @NotBlank(message = "请假原因不能为空！")
    @ApiModelProperty(value = "请假原因")
    private String reason;

    @NotBlank(message = "请假人不能为空！")
    @ApiModelProperty(value = "请假人")
    private String leaveUserId;

    @Size(min = 11, max = 11, message = "手机号码长度不能超过或小于11个字符")
    @ApiModelProperty(value = "电话号码")
    private String phoneNumber;

    @NotBlank(message = "紧急联系人不能为空！")
    @ApiModelProperty(value = "紧急联系人")
    private String emergencyContact;

    @Size(min = 11, max = 11, message = "手机号码长度不能超过或小于11个字符")
    @ApiModelProperty(value = "紧急联系人电话")
    private String emergencyContactNumber;

    @NotNull(message = "请假开始时间不能为空！")
    @ApiModelProperty(value = "请假开始时间")
    private Date beginTime;

    @NotNull(message = "请假结束时间不能为空！")
    @ApiModelProperty(value = "请假结束时间")
    private Date endTime;

    @NotBlank(message = "请假去向不能为空！")
    @ApiModelProperty(value = "请假去向")
    private String leaveTo;

}
